<template>
	<view class="bigbox pb100
	">
		<!-- 各种工 -->
		<u-empty text="暂无工作" marginTop="100" v-if="!list.length"></u-empty>
		<view class="" v-for="(item,index) in list" :key="index">
			<blueJobList :data="item" />
		</view>
	</view>
</template>

<script>
	import blueJobList from '@/components/blueJobList.vue'
	export default {
		components: {
			blueJobList
		},
		data() {
			return {
				category_id: '',
				page: 1,
				name: '',
				list: [],
				type: ''
			};
		},
		onLoad(e) {
			if (e.tit) {
				uni.setNavigationBarTitle({
					title: e.tit
				})
			}
			if (e.id) {
				this.category_id = e.id
			}
			if (e.type) {
				this.type = e.type
			}
			console.log(e);
			this.collarList()
		},
		methods: {
			collarList() {
				let data = {
					category_id: this.category_id,
					page: 1,
					size: this.page * 10,
					name: this.name,
					state:1
				}
				let api=''
				if (this.type == 1) {
					api = 'reindex'
				} else if (this.type == 2) {
					api = 'collarList'
				} else if (this.type == 3) {
					api = 'Internships'
				}
				this.$api[api](data).then(res => {
					this.list = res.data
				})
			}
		}
	}
</script>

<style lang="scss">

</style>
